#!/usr/bin/env python
# -*- coding: utf-8 -*-

import time,datetime

def timeToStr(unixtime):
    return time.strftime("%Y-%m-%dT%H:%M:%S", time.localtime(unixtime))


def strToTimestamp(str):
    return datetime.datetime.strptime(str, '%Y-%m-%d %H:%M:%S')


def str_to_unix_timestamp(string):
    time_format = "%Y-%m-%dT%H:%M:%S"
    tmObject = time.strptime(string, time_format)
    return time.mktime(tmObject)


if __name__ == "__main__":
    def time_control(str_time):
        times_input = str_to_unix_timestamp(str_time)
        if times_input > time.time():
            return True
        return False
    print(time_control('2020-07-22T12:22:1'))